/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1_8008
 Source Server Type    : MariaDB
 Source Server Version : 100605
 Source Host           : 127.0.0.1:8008
 Source Schema         : ginchat

 Target Server Type    : MariaDB
 Target Server Version : 100605
 File Encoding         : 65001

 Date: 27/12/2022 11:32:22
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for communities
-- ----------------------------
DROP TABLE IF EXISTS `communities`;
CREATE TABLE `communities` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `owner_id` bigint(20) unsigned DEFAULT NULL,
  `img` longtext DEFAULT NULL,
  `desc` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_communities_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of communities
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for contact
-- ----------------------------
DROP TABLE IF EXISTS `contact`;
CREATE TABLE `contact` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  `owner_id` bigint(20) unsigned DEFAULT NULL,
  `target_id` bigint(20) unsigned DEFAULT NULL,
  `type` bigint(20) DEFAULT NULL,
  `desc` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_contact_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of contact
-- ----------------------------
BEGIN;
INSERT INTO `contact` VALUES (1, NULL, NULL, NULL, 10, 11, 1, NULL);
INSERT INTO `contact` VALUES (2, NULL, NULL, NULL, 11, 10, 1, NULL);
COMMIT;

-- ----------------------------
-- Table structure for group_basic
-- ----------------------------
DROP TABLE IF EXISTS `group_basic`;
CREATE TABLE `group_basic` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `owner_id` longtext DEFAULT NULL,
  `icon` longtext DEFAULT NULL,
  `type` bigint(20) DEFAULT NULL,
  `desc` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_group_basic_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of group_basic
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  `form_id` bigint(20) unsigned DEFAULT NULL,
  `target_id` bigint(20) unsigned DEFAULT NULL,
  `type_id` longtext DEFAULT NULL,
  `media` bigint(20) DEFAULT NULL,
  `content` longtext DEFAULT NULL,
  `pic` longtext DEFAULT NULL,
  `url` longtext DEFAULT NULL,
  `desc` longtext DEFAULT NULL,
  `amount` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_message_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of message
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_basic
-- ----------------------------
DROP TABLE IF EXISTS `user_basic`;
CREATE TABLE `user_basic` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` datetime(3) DEFAULT NULL,
  `updated_at` datetime(3) DEFAULT NULL,
  `deleted_at` datetime(3) DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `password` longtext DEFAULT NULL,
  `phone` longtext DEFAULT NULL,
  `email` longtext DEFAULT NULL,
  `identity` longtext DEFAULT NULL,
  `client_ip` longtext DEFAULT NULL,
  `client_port` longtext DEFAULT NULL,
  `login_time` datetime(3) DEFAULT NULL,
  `heart_beat_time` datetime(3) DEFAULT NULL,
  `login_out_time` datetime(3) DEFAULT NULL,
  `is_login_out` tinyint(1) DEFAULT NULL,
  `device_info` longtext DEFAULT NULL,
  `salt` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_user_basic_deleted_at` (`deleted_at`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4;

-- ----------------------------
-- Records of user_basic
-- ----------------------------
BEGIN;
INSERT INTO `user_basic` VALUES (10, '2022-12-15 17:03:20.569', '2022-12-27 11:27:15.452', NULL, 'test2', 'c5893940e847fdd5a6bd3c84a58cb6a1', '15312345676', '12345@qq.com', '3DF03F12D8DF634868A278937D025274', '', '', '0000-00-00 00:00:00.000', '0000-00-00 00:00:00.000', '0000-00-00 00:00:00.000', 0, '', '911902081');
INSERT INTO `user_basic` VALUES (11, '2022-12-26 16:36:38.504', '2022-12-27 11:27:01.847', NULL, 'flk001', '9d648f14f39b8644ece5995843f9c156', '', '', '0AF3306C750F365CF7EA7BE37B1725E5', '', '', '0000-00-00 00:00:00.000', '0000-00-00 00:00:00.000', '0000-00-00 00:00:00.000', 0, '', '1298498081');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
